package chapter3.test2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;

@Configuration
@PropertySource("classPath:/com/soundsystem/app.properties")
public class Config {
    @Autowired
    Environment env;

    @Bean
    public Demo demo(){
        return new Demo(env.getProperty("name"),env.getProperty("title"));
    }

}
